package com.bw.g3_619lx02.notice

import com.bw.lib_base.mvi.BaseViewModel
import com.bw.lib_base.mvi.IUiIntent
import com.bw.lib_base.net.ApiServer
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class NoticeViewModel @Inject constructor(val apiServer: ApiServer):BaseViewModel<NoticeIntent>() {

    override fun handlerIntent(it:NoticeIntent) {
        //处理意图(通过判断意图来请求数据)
        when(it){
           is NoticeIntent.getNotices->{

                httpRequest(apiServer.getNotices(it.page,it.size))

            }
        }
    }


}